package com.yuan.kafkastudy.controller;

import com.yuan.kafkastudy.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@RestController
@RequestMapping("test")
public class TestController {

    @Resource
    private UserMapper userMapper;

    @PostMapping("delete/{id}")
    public String delete(@PathVariable int id) {
        userMapper.deleteById(id);
        return "success";
    }
}
